package com.my.study.service.impl;

import com.my.study.dao.MyUserDao;
import com.my.study.entity.MyUserEntity;
import com.my.study.service.MyUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author Carlos
 * @version 1.0.0
 * @date 2022/1/7 8:37
 */
@Service
public class MyUserServiceImpl implements MyUserService {

    @Autowired
    private MyUserDao myUserDao;

    @Override
    public MyUserEntity getUserByName(String name) {
        return myUserDao.findByName(name);
    }

    @Override
    public void registerUser(MyUserEntity myUser) {
        myUserDao.registerUser(myUser);
    }

    @Override
    public MyUserEntity getUser(Integer userId) {
        return myUserDao.getUser(userId);
    }
}
